//b数组拷贝a数组
function fn1() {
    let a = [1, 2, 3];
    let b = [...a];
    console.log(b);
}
fn1();

function fn2() {
    let a = [1, 2, 3];
    let b = [];
    for (i = 0; i < a.length; i++) {
        let m = a[i];
        b.push(a[i]);
    }
    console.log(b);
}
fn2();
